package com.addzero.autoddlstarter.generator.defaultconfig

import com.addzero.autoddlstarter.context.SettingContext


object BaseMetaInfoUtil {
    fun isPrimaryKey(fieldName: String?): String {
        if (fieldName?.lowercase()!! == SettingContext.settings.id) {
            return "Y"
        }
        return ""
    }

    fun isPrimaryKeyBoolean(fieldName: String?): Boolean {
        return fieldName?.lowercase()!! == SettingContext.settings.id
    }

    fun isAutoIncrement(fieldName: String?): String {
        return isPrimaryKey(fieldName)
    }

    fun isAutoIncrementBoolean(fieldName: String?): Boolean {
        return isPrimaryKeyBoolean(fieldName)
    }


}
